Skip to content

Ci/lint and format#54

Merged
jodli merged 7 commits intomasterfrom
ci/lint-and-format
Mar 27, 2026
Merged

Ci/lint and format#54
jodli merged 7 commits intomasterfrom
ci/lint-and-format

Conversation

@jodli
Copy link
Copy Markdown
Owner

@jodli jodli commented Mar 27, 2026

No description provided.

jodli added 7 commits March 28, 2026 00:28
Configure luacheck with:
- Factorio 2.0 API globals (storage, helpers, prototypes, etc.)
- CreativeMod's ~40 module globals
- Factorio base data stage globals
- Suppressed warnings for legacy code patterns (unused vars, shadowing)
- Kept W111/W113 (undefined globals) active to catch real bugs
luacheck caught that `k` was being set as a global variable instead of
local in two places in item-providers-util.lua. This could potentially
cause subtle bugs if the global `k` was read elsewhere.
Configure stylua formatter with:
- 2-space indentation (matching modern Factorio mod conventions)
- 120 character column width
- Unix line endings
- Auto-prefer double quotes
Reformatted all 57 Lua files using stylua with:
- 2-space indentation (was tabs)
- 120 character column width
- Unix line endings
- Double quotes preferred

This is a pure formatting change with no logic modifications.
Use .git-blame-ignore-revs to skip this commit in git blame.
Allows git blame to look through the stylua formatting commit.
Configure with: git config blame.ignoreRevsFile .git-blame-ignore-revs
Runs on push to master and all PRs:
- luacheck: static analysis for undefined globals, wrong API usage
- stylua: formatting check (2-space indent, 120 col width)
`not x == false` is parsed as `(not x) == false` due to operator
precedence. Changed to `x ~= false` which expresses the intent clearly.
Caught by luacheck W582 in CI.
@jodli jodli merged commit 0eeb659 into master Mar 27, 2026
2 checks passed
@jodli jodli deleted the ci/lint-and-format branch March 27, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant